-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resources_lock_ lock_guards to avoid race condition when loading robot_description through topic (backport #1451) #1600
base: iron
Are you sure you want to change the base?
Conversation
Cherry-pick of 25f2c97 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## iron #1600 +/- ##
==========================================
- Coverage 62.08% 62.07% -0.02%
==========================================
Files 102 102
Lines 11775 11777 +2
Branches 8447 8449 +2
==========================================
Hits 7310 7310
Misses 747 747
- Partials 3718 3720 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As reported in #1442, loading the robot_description through the topic will cause a segmentation fault or some undefined behaviors as the read and write methods real-time methods are continuously executed, and when the robot description is received and the resource_manager is to be initialized, there is no lock_guard of recursive mutex
resources_lock_
, which should avoid the RM to execute the components when they are changing state or being loaded and initializedFixes #1442
This is an automatic backport of pull request #1451 done by Mergify.